package cn.wildfirechat.app.jpa;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Table(name = "posts")
public class Posts {

    @Id
//    @ApiModelProperty(value = "主键ID")
    private Long id;

//    @ApiModelProperty(value = "发布用户ID", required = true)
    private String userId;

//    @ApiModelProperty(value = "帖子内容", required = true)
    private String contentText;

//    @ApiModelProperty(value = "标签列表（分号分隔）")
    private String tags;

//    @ApiModelProperty(value = "可见范围：1公开/2好友/3私密", required = true)
    private Integer visibility;

//    @ApiModelProperty(value = "状态：0正常/1违规/2已删除/3待审核")
    private Integer status;

//    @ApiModelProperty(value = "点赞数量")
    private Integer likeCount;

//    @ApiModelProperty(value = "评论数量")
    private Integer commentCount;

//    @ApiModelProperty(value = "分享数量")
    private Integer shareCount;


//    @ApiModelProperty(value = "打赏总金额")
    private BigDecimal rewardAmount;

//    @ApiModelProperty(value = "是否置顶")
    private Boolean isTop;

//    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;

//    @ApiModelProperty(value = "审核原因")
    private String auditReason;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @ApiModelProperty(value = "更新时间")
    private Date updatedAt;

//    @ApiModelProperty(value = "修改人")
    private String updateBy;

//    @ApiModelProperty(value = "媒体类型：1图片/2视频")
    private Integer mediaType;

//    @ApiModelProperty("用户名")
    private String userName;
//    @ApiModelProperty("用户头像")
    private String avatar;

}
